# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.DFAReporting.V4.Model.CartData do
  @moduledoc """
  Contains additional information about cart data. This field may only be used when calling batchinsert; it is not supported by batchupdate.

  ## Attributes

  *   `items` (*type:* `list(GoogleApi.DFAReporting.V4.Model.CartDataItem.t)`, *default:* `nil`) - Data of the items purchased.
  *   `merchantFeedLabel` (*type:* `String.t`, *default:* `nil`) - The feed labels associated with the feed where your items are uploaded. For more information, please refer to ​​ https://support.google.com/merchants/answer/12453549. Providing the feed label reduces ambiguity in identifying the right offer details.
  *   `merchantFeedLanguage` (*type:* `String.t`, *default:* `nil`) - The language associated with the feed where your items are uploaded. Use ISO 639-1 language codes. Providing the feed language reduces ambiguity in identifying the right offer details.
  *   `merchantId` (*type:* `String.t`, *default:* `nil`) - The Merchant Center ID where the items are uploaded. Providing Merchant Center ID reduces ambiguity in identifying the right offer details.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :items => list(GoogleApi.DFAReporting.V4.Model.CartDataItem.t()) | nil,
          :merchantFeedLabel => String.t() | nil,
          :merchantFeedLanguage => String.t() | nil,
          :merchantId => String.t() | nil
        }

  field(:items, as: GoogleApi.DFAReporting.V4.Model.CartDataItem, type: :list)
  field(:merchantFeedLabel)
  field(:merchantFeedLanguage)
  field(:merchantId)
end

defimpl Poison.Decoder, for: GoogleApi.DFAReporting.V4.Model.CartData do
  def decode(value, options) do
    GoogleApi.DFAReporting.V4.Model.CartData.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.DFAReporting.V4.Model.CartData do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
